package com.dylan.channel.v4;

import java.nio.channels.SocketChannel;

public  abstract class MultiThreadEventLoopGroup extends MultiTreadEventExecutorGroup implements EventLoopGroup{

    public MultiThreadEventLoopGroup(int treads) {
        super(treads);
    }
    @Override
    protected abstract EventLoop newChild();

    @Override
    public EventLoop next() {
        return (EventLoop) super.next();
    }
    //这个方法是实现了EventLoopGroup接口中的同名方法
    @Override
    public void register(SocketChannel channel){
        next().register(channel);
    }
}
